<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
    //    用户输入价格和数量
    let price = prompt("请输入商品单价");
    let num = prompt("请输入数量");
    // console.log(price,num);
    // 处理数据，计算商品总价，单价*数量
    let count = price * num;
    // 页面输出
    document.write(`商品总价为：${count}元`);//一定要用反斜杠！
    </script>
</body>
</html>